﻿<UserControl x:Class="Sentinel.Log4Net.ConfigurationPage"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:Converters="clr-namespace:WpfExtras.Converters;assembly=WpfExtras" mc:Ignorable="d"
             d:DesignHeight="226"
             d:DesignWidth="294"
             SnapsToDevicePixels="True">

    <UserControl.Resources>
        <Converters:BooleanInvertingValueConverter x:Key="InvertConverter" />
        <Converters:VisibilityToHiddenConverter x:Key="visToHiddenConverter" />
    </UserControl.Resources>
    
    <Grid Margin="3">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="40" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0"
                    Grid.Column="1"
                    IsEnabled="False"></StackPanel>
        <TextBlock Text="Port : "
                   Margin="3"
                   Grid.Row="2"
                   VerticalAlignment="Center" />
        <TextBox x:Name="portText"
                 Margin="3"
                 Text="{Binding Port, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
                 Grid.Row="2"
                 Grid.Column="1"
                 VerticalAlignment="Center" />
        <TextBlock Margin="3"
                   Grid.Row="3"
                   Grid.Column="1"
                   VerticalAlignment="Top"
                   TextWrapping="WrapWithOverflow">
            <Run>Please note that depending upon your firewall settings, you may be prompted to confirm the opening of a network port.</Run>
            <LineBreak />
            <Run>This normally only occurs the first time.</Run>
        </TextBlock>
    </Grid>
</UserControl>